# program equilibrium #This program solves the model described in #"On the Needed Quantity of Government Debt" #Federal Reserve Bank of Minneapolis Working Paper 648 #by Kathryn Birkeland and Edward Prescott #Input file: equilibrium.inp #Output file: equilibrium.out #See Appendix A in the paper and readme.txt for more information #Inputs: AR = retirement age less 20 years # (note: the agent is born at t=0 and age=20) # AD = lifespan less 20 years # gamma = growth rate of technology # eta = growth rate of the population # irate = interest rate # theta = capital share in the cobb-douglas production function # delta = depreciation rate of the capital stock # alpha = preference parameter # Z = labor-augmenting technology in production # # # beta = time discount factor of the household # Npop = size of the initial population # tauh = input labor income tax rate # tauk = input tax rate on net capital income # g = growth rate of aggregate output # Ncohort = size of the cohort entering the workforce in period 1 # Nwork = size of the working population in period 1 # r = rental price of capital # HK = aggregate capital labor ratio # w = wage rate # CH = aggregate consumption to labor ratio # cw = consumption of an individual # hi = individual labor supply # H = aggregate labor supply # C = aggregate consumption # K = aggregate capital stock # Y = aggregate output # X = aggregate investment # utility = lifetime utility of a person entering the workforce in t=1 # utility/discount can be used for the welfare comparison # in terms of lifetime consumption equivalents # #Written by Kathryn Birkeland and Edward C. Prescott 3-24-06 #Revised KFB 12-28-06 #Modified by B. Goff for classroom use; making for y fitting long term growth #rather than steady state nulldata 100 series e = normal() series gamma = 0.02 + .005*e scalar eta=0.03 scalar irate = 0.04 scalar theta = 0.35 scalar delta = 0.05 scalar alpha = 2.14626 scalar Z = 0.026888 scalar beta = 0.980768 scalar tauh = 0.4 scalar tauk = 0.2 scalar dep = 0.175 scalar ARet = 45 scalar AD = 65 series t = time #growth rate of per capita consumption genr g = (1+gamma)*(1+eta)-1 smpl 1 1 series Npop = 100 smpl 2 100 series Npop = (1+eta)*Npop(-1) smpl 1 100 #Compute the size of the cohort born in period one given the initial population series xeta = 0 loop i=1..AD series xeta = xeta + (1/(1+eta))^i endloop #This is a simplification of Prescott genr Ncohort = Npop #Find the size of the working population given the size of cohort one series xwork=0 loop i=1..ARet series xwork = xwork + (1/(1+eta))^i endloop genr Nwork = Npop #Compute the rental rate on capital, capital labor ratio, and wage genr r = irate/(1-tauk)+delta genr HK = ((r/theta)^(1/(1-theta)))/Z genr w = Z^(1-theta)*(1-theta)*(HK)^(-theta) genr KH = 1/HK #Compute individual consumption and labor genr CH = Z^(1-theta)*KH^theta - (g+delta)*KH genr cw = 1/(alpha/((1-tauh)*w) + Npop/(CH*Nwork)) genr hi = 1 - alpha*cw/(w*(1-tauh)) #Compute aggregate labor, consumption, capital, output and investment genr H = Nwork*hi genr Ci = Npop*cw genr K = KH*H genr Y= (K^theta)*(Z*H)^(1-theta) genr X = Y-Ci genr Ypc = (Y-Y(-1))/Y(-1) genr Ypercap = Y/Npop